package com.puti.doctor.service.impl;

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.List;

import com.puti.common.core.domain.R;
import com.puti.doctor.domian.Cart;
import com.puti.doctor.domian.GoodsInfo;
import com.puti.doctor.domian.SeckillEvaluate;
import com.puti.doctor.mapper.GoodsInfoMapper;
import com.puti.doctor.service.IGoodsInfoService;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;


/**
 * 商品-信息 商品-信息Service业务层处理
 *
 * @author puti
 * @date 2021-04-21
import java.util.List;

import com.puti.doctor.domian.GoodsInfo;
import com.puti.doctor.mapper.GoodsInfoMapper;
import com.puti.doctor.service.IGoodsInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 商品-信息 商品-信息Service业务层处理
 *
 * @author puti
 * @date 2021-04-22
 */
@Service
public class GoodsInfoServiceImpl implements IGoodsInfoService
{
    @Autowired
    private GoodsInfoMapper goodsInfoMapper;

    /**
     * 查询商品-信息 商品-信息
<<<<<<< HEAD
     * 
=======
     *
>>>>>>> origin/master
     * @param goodsId 商品-信息 商品-信息ID
     * @return 商品-信息 商品-信息
     */
    @Override
    public GoodsInfo selectGoodsInfoById(Long goodsId)
    {
        return goodsInfoMapper.selectGoodsInfoById(goodsId);
    }

    /**
     * 查询商品-信息 商品-信息列表
     *
     * @param goodsInfo 商品-信息 商品-信息
     * @return 商品-信息 商品-信息
     */
    @Override
    public List<GoodsInfo> selectGoodsInfoList(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.selectGoodsInfoList(goodsInfo);
    }

    @Override
    public List<GoodsInfo> selectHospitalDoctorInfotime(GoodsInfo goodsInfo) {
        return goodsInfoMapper.selectHospitalDoctorInfotime(goodsInfo);
    }

    /**
     * 新增商品-信息 商品-信息
     *
     * @param goodsInfo 商品-信息 商品-信息
     * @return 结果
     */
    @Override
    public int insertGoodsInfo(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.insertGoodsInfo(goodsInfo);
    }

    /**
     * 修改商品-信息 商品-信息
     *
     * @param goodsInfo 商品-信息 商品-信息
     * @return 结果
     */
    @Override
    public int updateGoodsInfo(GoodsInfo goodsInfo)
    {
        return goodsInfoMapper.updateGoodsInfo(goodsInfo);
    }

    /**
     * 批量删除商品-信息 商品-信息
     *
     * @param goodsIds 需要删除的商品-信息 商品-信息ID
     * @return 结果
     */
    @Override
    public int deleteGoodsInfoByIds(Long[] goodsIds)
    {
        return goodsInfoMapper.deleteGoodsInfoByIds(goodsIds);
    }

    /**
     * 删除商品-信息 商品-信息信息
     *
     * @param goodsId 商品-信息 商品-信息ID
     * @return 结果
     */
    @Override
    public int deleteGoodsInfoById(Long goodsId)
    {
        return goodsInfoMapper.deleteGoodsInfoById(goodsId);
    }

    @Override
    public List<GoodsInfo> selectImmediate(String goodsCode) {

        return goodsInfoMapper.selectImmediate(goodsCode);
    }

    @Override
    public List<SeckillEvaluate> selectseckill(String goodsCode) {
        return goodsInfoMapper.selectseckill(goodsCode);
    }

    @Override
    public List<GoodsInfo> selectInfo(String goodsCode) {
        return goodsInfoMapper.selectInfo(goodsCode);
    }

    @Override
    public List<SeckillEvaluate> selectEvaluat(String goodsCode) {
        return goodsInfoMapper.selectEvaluat(goodsCode);
    }



}
